package com.atguigu.srb.core.mapper;

import com.atguigu.srb.core.pojo.entity.CooperationTable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CooperationTableMapper extends BaseMapper<CooperationTable> {
    @Select("SELECT * FROM cooperation_table WHERE club_a_number = #{id}  ANd is_deleted = 0 ")
    List<CooperationTable> selectByRespondingClubNumber( @Param("id") String communitynumber);

    @Select("SELECT * FROM cooperation_table WHERE(club_a_number = #{id} OR club_b_number =#{id}) ANd is_deleted = 0 AND status = '已接受' ")
    List<CooperationTable> selectByRespondingClubNumber02( @Param("id") String communitynumber);

    @Select("SELECT * FROM cooperation_table WHERE club_b_number =#{id} ANd is_deleted = 0 ")
    List<CooperationTable> selectByRespondingClubNumber03( @Param("id")  String communitynumber);
}
